package com.csk.zsk.compents.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csk.zsk.compents.dao.CodeGroupDao;
import com.csk.zsk.compents.entity.CodeGroup;
import com.csk.zsk.compents.service.CodeGroupService;

@Service
@Transactional
public class CodeGroupServiceImpl implements CodeGroupService {

	@Autowired
	private CodeGroupDao codeGroupDao;

	@Override
	public void saveCodeGroup(CodeGroup codeGroup) {
		codeGroupDao.saveBeforeClear(codeGroup);

	}

	@Override
	public void deleteCodeGroup(String id) {
		codeGroupDao.delete(id);

	}

	@Override
	@Transactional(readOnly = true)
	public CodeGroup getCodeGroup(String id) {
		return codeGroupDao.get(id);
	}
}
